package com.llc.servlet;

import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.boot.builder.SpringApplicationBuilder;
import org.springframework.boot.web.servlet.ServletComponentScan;
import org.springframework.boot.web.servlet.support.SpringBootServletInitializer;

/**
 * 	当要运行在tomcat等三方插件是，要实现SpringBootServletInitializer，不然认不到项目
 * @author linlvcao
 * @email 1013573731@qq.com
 * @time 2020年4月11日 下午3:01:33
 *
 */
@SpringBootApplication		//	标注程序为Spring-boot项目
@ServletComponentScan("com.llc.servlet.gateway")//	添加本注释，可以直接运行后访问接口
//@ServletComponentScan("com.llc.servlet.gateway.*")//	当接口地址在这个文件夹下的子文件夹时的写法
public class ServletApplication extends SpringBootServletInitializer {

	public static void main(String[] args) {
		SpringApplication.run(ServletApplication.class, args);
	}
	
	@Override
	protected SpringApplicationBuilder configure(SpringApplicationBuilder application) {
		return application.sources(ServletApplication.class);
	}
}
